<template>
	<h3>MyRight组件</h3>
	<h4>引用src/assets目录的静态资源</h4>
	<img :src="img2" alt="" class="img-thumbnail" />
</template>

<script setup>
	  import {onActivated, onDeactivated, onMounted, onUnmounted, ref } from 'vue';
	//需要用import语法导入图片路径
	import img2 from '../assets/2.png'
	
	onActivated(()=>{
		console.log('MyRight组件被激活了')
	})
	onDeactivated(()=>{
		console.log('MyRight组件被缓存了')
	})
</script>

<style scoped>
</style>